Update GtkApplicationWindow docs
authorMatthias Clasen <mclasen@redhat.com>
Sun, 4 Dec 2011 23:40:19 +0000 (18:40 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 19 Dec 2011 17:51:10 +0000 (12:51 -0500)
docs/reference/gtk/gtk3-sections.txt
gtk/gtkapplicationwindow.c

index 6d83478685461c63a3d1f9750c45664bd5577534..acf9c92e5c5288e3cdbdcd6b10de06d9f9c12054 100644 (file)
@@ -7024,9 +7024,8 @@ GtkApplicationPrivate
 <TITLE>GtkApplicationWindow</TITLE>
 GtkApplicationWindow
 gtk_application_window_new
-gtk_application_window_set_show_app_menu
-gtk_application_window_get_show_app_menu
-gtk_application_window_get_app_menu
+gtk_application_window_set_show_menubar
+gtk_application_window_get_show_menubar
 
 <SUBSECTION Standard>
 GtkApplicationWindowClass
index 3577842c0d22f58b4c28b0cecb15ebced425dbff..24adfce16c7d75c98591e888f2b884043944e331 100644 (file)
@@ -49,7 +49,7 @@
  * If the desktop environment does not display the application menu
  * as part of the desktop shell, then #GApplicationWindow will
  * automatically show the menu as part of a menubar. This behaviour
- * can be overridden with the #GtkApplicationWindow:show-app-menu
+ * can be overridden with the #GtkApplicationWindow:show-menubar
  * property.
  */
 struct _GtkApplicationWindowPrivate
@@ -568,11 +568,22 @@ gtk_application_window_class_init (GtkApplicationWindowClass *class)
   object_class->set_property = gtk_application_window_set_property;
   object_class->dispose = gtk_application_window_dispose;
 
+  /**
+   * GtkApplicationWindow:show-menubar:
+   *
+   * If this property is %TRUE, the window will display a menubar
+   * that includes the app menu and menubar, unless these are
+   * shown by the desktop shell. See g_application_set_app_menu()
+   * and g_application_set_menubar().
+   *
+   * If %FALSE, the window will not display a menubar, regardless
+   * of whether the desktop shell is showing the menus or not.
+   */
   gtk_application_window_properties[PROP_SHOW_MENUBAR] =
     g_param_spec_boolean ("show-menubar",
                           P_("Show a menubar"),
-                          P_("TRUE if the application's menus should be included "
-                             "in the menubar at the top of the window"),
+                          P_("TRUE if the window should show a "
+                             "menubar at the top of the window"),
                           TRUE, G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE);
   g_object_class_install_properties (object_class, N_PROPS, gtk_application_window_properties);
   g_type_class_add_private (class, sizeof (GtkApplicationWindowPrivate));
@@ -598,12 +609,33 @@ gtk_application_window_new (GtkApplication *application)
                        NULL);
 }
 
+/**
+ * gtk_application_window_get_show_menubar:
+ * @window: a #GtkApplicationWindow
+ *
+ * Returns whether the window will display a menubar for the app menu
+ * and menubar as needed.
+ *
+ * Returns: %TRUE if @window will display a menubar when needed
+ *
+ * Since: 3.4
+ */
 gboolean
 gtk_application_window_get_show_menubar (GtkApplicationWindow *window)
 {
   return window->priv->show_menubar;
 }
 
+/**
+ * gtk_application_window_set_show_menubar:
+ * @window: a #GtkApplicationWindow
+ * @show_menubar: whether to show a menubar when needed
+ *
+ * Sets whether the window will display a menubar for the app menu
+ * and menubar as needed.
+ *
+ * Since: 3.4
+ */
 void
 gtk_application_window_set_show_menubar (GtkApplicationWindow *window,
                                          gboolean              show_menubar)